package com.succodes.lostandfound.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.succodes.lostandfound.dto.PropertyQueryParam;
import com.succodes.lostandfound.entity.Property;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.succodes.lostandfound.vo.PropertyVo;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 丢失的个人所有物，包括根据物品寻找失主和失主寻找失物 Mapper 接口
 * </p>
 *
 * @author 石炫杰
 * @since 2022-08-17
 */
public interface PropertyMapper extends BaseMapper<Property> {

    /**
     * 失物列表
     * @param page propertyQueryParam
     * @return Page<PropertyVo>
     */
    Page<PropertyVo> appPage(Page page, @Param("queryParam") PropertyQueryParam propertyQueryParam);

    /**
     * 失物详情
     * @param productId
     * @return PropertyVo
     */
    PropertyVo detail(Long productId);
}
